package cn.zhangjie.pet.domain;

import cn.zhangjie.org.domain.Shop;
import cn.zhangjie.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Pet {
    private Long id;

    private String name;
    //进价
    private BigDecimal costprice;
    //售价
    private BigDecimal saleprice;
    //类型
    private Long type_id;
    private PetType type;
    //资源
    private String resources;
    //状态
    private Integer state = 0;
    //下架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "gtm+8")
    private Date offsaletime;
    //上架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "gtm+8")
    private Date onsaletime;
    //时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "gtm+8")
    private Date createtime = new Date();
    //对应店铺
    private Long shop_id;
    private Shop shop;
    //主人
    private Long user_id;
    private User user;
    //寻主id
    private Long search_master_msg_id;

    private PetDetail petDetail;

}
